﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Oracle.ManagedDataAccess.Client;

namespace bzxxxt
{
    public partial class Exchange : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string connStr = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.40.0.205))(CONNECT_DATA=(SERVICE_NAME=orcl)));Persist Security Info=True;User ID=orcl_sz;Password=orclsz;";
                OracleConnection conn = new OracleConnection(connStr);
                
                conn.Open();
                var cmd = conn.CreateCommand();

                cmd.CommandText = "select sysdate from dual";

                cmd.CommandType = CommandType.Text;

                var reader = cmd.ExecuteReader();

                while (reader.Read())
                {

                    

                }
                conn.Close();
            }
            catch (Exception ex) {
                lblMsg.Text = ex.Message;
            }
        }
    }
}